import keyboard
from threading import Thread
import time
flag=True
print(3)
def kp(k):
    print(k)
def keyWait():
    global flag
    keyboard.wait("c")
    print("exit thread")
    flag=False
t=Thread(target=keyWait)
t.start()
while flag:
    print(time.time())
    time.sleep(1)